package cn.org.donald.framework.annotation;

import cn.org.donald.framework.config.ListSizeValidate;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;


/**
 * 表单验证 集合
 * @author : Donald
 * @since : 2020/12/17 14:45
 */
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD,ElementType.TYPE,ElementType.METHOD})
@Documented
@Constraint(validatedBy = ListSizeValidate.class)
public @interface ListSize {

    String message() default "{There is can not be validated by cn.org.donald.framework.annotation.ListSize!}";

    Class<?>[] groups() default { };

    Class<? extends Payload>[] payload() default { };

    int min() default 1;

    int max() default -1;

}
